/* eslint-disable prettier/prettier */
import React from 'react';
import { Toast } from '@ant-design/react-native';
let customKey = null
Toast.showLoading = (text) => {
    if (customKey) return;
    customKey = Toast.loading(
        text, 2
    );
},
Toast.showFail =  (text) => {
    if (customKey) return;
    customKey = Toast.fail(
        text, 2
    );
},
Toast.hideLoading = () => {
    if (!customKey) return;
    Toast.remove(customKey);
    customKey = null;
}
export default Toast;